
const login = {
    state: {
        token: ''
    },
    actions: {
        setToken(state: {token: string}, value: string) {
            localStorage.setItem('token', value)
            state.token = value
        }
    } as any,
    actionsName: {} as any
}

// 遍历获取actionsName
for(let key in login.actions) {
    login.actionsName[key] = key
}

export default login